# xpath 数据解析
f = open('text.html','r',encoding='utf-8')
data = f.read()
f.close()

# 下载lxml
# pip install lxml
from lxml import etree

# 把字符串转换成一个可以被解析的对象
html = etree.HTML(data)

print(html.xpath('/html/body/div/text()'))

